<?php
/* @var $this QShiftController */
/* @var $days days date sarray */
/* @var $team team id*/


$this->pageTitle=Yii::app()->name . ' - My Shifts';
$this->breadcrumbs=array(
	'Q-Shifts'=>array('/qshift/'),
	'Team Q-Shifts',
);
?>

<h1>Team Q-Shifts</h1>
<br>


<center>
<h3>Viewing Week <?php echo $week; ?> -  <?php echo $year; ?>   </h3>

From <?php echo $days['monday'];?> thru <?php echo $days['sunday'];?>
<br>
<br>


	<?php
	echo CHtml::link('<-Prev Week', 
					 Yii::app()->createUrl('/qshift/team_Qshifts' , 
										   array('team'=>Yii::app()->user->team_id, 
											     'week'=> ($week!=1)? $week-1 : 52, 
											     'year'=> ($week!=1)? $year : $year-1)), 
					 array('title' => 'Previous Week','style'=>'color:#339900;')
				); 	
	?>
	
	&nbsp | &nbsp
	
	<?php
	echo CHtml::link('Next Week->', 
					 Yii::app()->createUrl('/qshift/team_Qshifts' , 
										   array('team'=>Yii::app()->user->team_id, 
												 'week'=> ($week!=52)? $week+1 : 1, 
												 'year'=>($week!=52)? $year : $year+1)), 
					 array('title' => 'Next Week','style'=>'color:#339900;')
				); 	
	?>
	
<br>	
<br>	
	
	<?php
	$this->widget('zii.widgets.jui.CJuiTabs',array(
		'themeUrl' => Yii::app()->baseUrl . '/css/jui',
		'theme' => 'start',
		'cssFile' => 'jquery-ui-1.10.3.custom.css',		
		'tabs'=>array(  
			'Monday'=>array('id'=>$days['monday'], 'ajax'=>$this->createUrl('ajaxTabContent?team='.$team.'&date='.$days['monday'])),
			'Tuesday'=>array('id'=>$days['tuesday'],'ajax'=>$this->createUrl('ajaxTabContent?team='.$team.'&date='.$days['tuesday'])),
			'Wednesday'=>array('id'=>$days['wednesday'],'ajax'=>$this->createUrl('ajaxTabContent?team='.$team.'&date='.$days['wednesday'])),
			'Thursday'=>array('id'=>$days['thursday'],'ajax'=>$this->createUrl('ajaxTabContent?team='.$team.'&date='.$days['thursday'])),
			'Friday'=>array('id'=>$days['friday'],'ajax'=>$this->createUrl('ajaxTabContent?team='.$team.'&date='.$days['friday'])),
			'Saturday'=>array('id'=>$days['saturday'],'ajax'=>$this->createUrl('ajaxTabContent?team='.$team.'&date='.$days['saturday'])),
			'Sunday'=>array('id'=>$days['sunday'],'ajax'=>$this->createUrl('ajaxTabContent?team='.$team.'&date='.$days['sunday'])),
		),
		// additional javascript options for the tabs plugin
		'options'=>array(
			'collapsible'=>false,
		),
		'id'=>'Weekdays',
	));
	?>
</center>
<i><font size='-3'>
<font color=blue>*</font> = Qshift Swap
<br>
<font color=red>**</font> = Shift Change
